﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 猫_狗_鸭_猴
{
    class Program
    {
        static void Main(string[] args)
        {
            Cat c = new Cat("加菲猫");
            Test1(c);
            Test2(c);
            Dog d = new Dog("哈巴狗");
            Test1(d);
            Test4(d);
            Duck dc = new Duck("唐老鸭");
            Test1(d);
            Test4(d);
            Monkey mon = new Monkey("老孙");
            Test1(c);
            Test2(c);
        }
        public static void  Test1(Animal a)
        {
            a.Eat();
        }
        public static void Test2(IClimbingTree c)
        {
            c.Climb();
        }
        public static void Test3(IFlyable fly)
        {
            fly.Fly();
        }
        public static void Test4(ISwim swim)
        {
            swim.Swim();
        }
    }
}
